﻿using System;
using System.Collections.Generic;
using System.Xml.Linq;
using System.Xml;

namespace SchemaGen.Xsd
{
    /// <summary>
    /// Built-in types from the w3c XML schema standard
    /// </summary>
    public enum XsdSimpleType
    {
        NULL,

        #region String

        Entities,
        Entity,
        /// <summary>
        /// A string that represents the ID attribute in XML (only used with schema attributes)
        /// </summary>
        ID,
        /// <summary>
        /// A string that represents the IDREF attribute in XML (only used with schema attributes)
        /// </summary>
        IdRef,
        IdRefs,
        /// <summary>
        /// A string that contains a valid language id
        /// </summary>
        Language,
        /// <summary>
        /// A string that contains a valid XML name
        /// </summary>
        Name,
        NcName,
        NmToken,
        /// <summary>
        /// A string that represents the NMTOKEN attribute in XML (only used with schema attributes)
        /// </summary>
        NmTokens,
        /// <summary>
        /// A string that does not contain line feeds, carriage returns, or tabs
        /// </summary>
        NormalizedString,
        QName,
        /// <summary>
        /// A string
        /// </summary>
        String,
        /// <summary>
        /// A string that does not contain line feeds, carriage returns, tabs, leading or trailing spaces, or multiple spaces
        /// </summary>
        Token,

        #endregion

        #region Date And Time

        /// <summary>
        /// Defines a date value
        /// </summary>
        Date,
            
        /// <summary>
        /// Defines a date and time value
        /// </summary>
        DateTime,
            
        /// <summary>
        /// Defines a time interval
        /// </summary>
        Duration,
            
        /// <summary>
        /// Defines a part of a date - the day (DD)
        /// </summary>
        GDay,
            
        /// <summary>
        /// Defines a part of a date - the month (MM)
        /// </summary>
        GMonth,
            
        /// <summary>
        /// Defines a part of a date - the month and day (MM-DD)
        /// </summary>
        GMonthDay,
            
        /// <summary>
        /// Defines a part of a date - the year (YYYY)
        /// </summary>
        GYear,
            
        /// <summary>
        /// Defines a part of a date - the year and month (YYYY-MM)
        /// </summary>
        GYearMonth,
            
        /// <summary>
        /// Defines a time value
        /// </summary>
        Time,

        #endregion

        #region Numeric

        /// <summary>
        /// A signed 8-bit integer
        /// </summary>
        Byte,
            
        /// <summary>
        /// A decimal value
        /// </summary>
        Decimal,
            
        /// <summary>
        /// A signed 32-bit integer
        /// </summary>
        Int,
            
        /// <summary>
        /// An integer value
        /// </summary>
        Integer,
            
        /// <summary>
        /// A signed 64-bit integer
        /// </summary>
        Long,
            
        /// <summary>
        /// An integer containing only negative values (..,-2,-1)
        /// </summary>
        NegativeInteger,
            
        /// <summary>
        /// An integer containing only non-negative values (0,1,2,..)
        /// </summary>
        NonNegativeInteger,
            
        /// <summary>
        /// An integer containing only non-positive values (..,-2,-1,0)
        /// </summary>
        NonPositiveInteger,
            
        /// <summary>
        /// An integer containing only positive values (1,2,..)
        /// </summary>
        PositiveInteger,
            
        /// <summary>
        /// A signed 16-bit integer
        /// </summary>
        Short,
            
        /// <summary>
        /// An unsigned 64-bit integer
        /// </summary>
        UnsignedLong,
            
        /// <summary>
        /// An unsigned 32-bit integer
        /// </summary>
        UnsignedInt,
            
        /// <summary>
        /// An unsigned 16-bit integer
        /// </summary>
        UnsignedShort,
            
        /// <summary>
        /// An unsigned 8-bit integer
        /// </summary>
        UnsignedByte,

        #endregion

        #region Miscellaneous

        /// <summary>
        /// Note: If a URI has spaces, replace them with %20.
        /// </summary>
        AnyURI,

        Base64Binary,

        /// <summary>
        /// Legal values for boolean are true, false, 1 (which indicates true), and 0 (which indicates false).
        /// </summary>
        Boolean,
        Double,
        Float,
        HexBinary,
        Notation

        #endregion
    }

    /// <summary>
    /// Contains names from the w3c XML schema standard
    /// </summary>
    public static class SNames
    {
        public static XNamespace XsdSchemaNamespace { get { return @"http://www.w3.org/2001/XMLSchema"; } }

        #region Simple Type Enumeration Lookup

        internal static readonly SortedList<XsdSimpleType, XName> SimpleTypeLookup = new SortedList<XsdSimpleType, XName>()
        {
            { XsdSimpleType.NULL, null },

            // String Types
            { XsdSimpleType.Entities, StringDataTypes.Entities },
            { XsdSimpleType.Entity, StringDataTypes.Entity },
            { XsdSimpleType.ID, StringDataTypes.ID },
            { XsdSimpleType.IdRef, StringDataTypes.IdRef },
            { XsdSimpleType.IdRefs, StringDataTypes.IdRefs },
            { XsdSimpleType.Language, StringDataTypes.Language },
            { XsdSimpleType.Name, StringDataTypes.Name },
            { XsdSimpleType.NcName, StringDataTypes.NcName },
            { XsdSimpleType.NmToken, StringDataTypes.NmToken },
            { XsdSimpleType.NmTokens, StringDataTypes.NmTokens },
            { XsdSimpleType.NormalizedString, StringDataTypes.NormalizedString },
            { XsdSimpleType.QName, StringDataTypes.QName },
            { XsdSimpleType.String, StringDataTypes.String },
            { XsdSimpleType.Token, StringDataTypes.Token },

            // Date and Time Types
            { XsdSimpleType.Date, DateAndTimeDataTypes.Date },
            { XsdSimpleType.DateTime, DateAndTimeDataTypes.DateTime },
            { XsdSimpleType.Duration, DateAndTimeDataTypes.Duration },
            { XsdSimpleType.GDay, DateAndTimeDataTypes.GDay },
            { XsdSimpleType.GMonth, DateAndTimeDataTypes.GMonth },
            { XsdSimpleType.GMonthDay, DateAndTimeDataTypes.GMonthDay },
            { XsdSimpleType.GYear, DateAndTimeDataTypes.GYear },
            { XsdSimpleType.GYearMonth, DateAndTimeDataTypes.GYearMonth },
            { XsdSimpleType.Time, DateAndTimeDataTypes.Time },

            // Numeric Types
            { XsdSimpleType.Byte, NumericDataTypes.Byte },
            { XsdSimpleType.Decimal, NumericDataTypes.Decimal },
            { XsdSimpleType.Int, NumericDataTypes.Int },
            { XsdSimpleType.Integer, NumericDataTypes.Integer },
            { XsdSimpleType.Long, NumericDataTypes.Long },
            { XsdSimpleType.NegativeInteger, NumericDataTypes.NegativeInteger },
            { XsdSimpleType.NonNegativeInteger, NumericDataTypes.NonNegativeInteger },
            { XsdSimpleType.NonPositiveInteger, NumericDataTypes.NonPositiveInteger },
            { XsdSimpleType.PositiveInteger, NumericDataTypes.PositiveInteger },
            { XsdSimpleType.Short, NumericDataTypes.Short },
            { XsdSimpleType.UnsignedLong, NumericDataTypes.UnsignedLong },
            { XsdSimpleType.UnsignedInt, NumericDataTypes.UnsignedInt },
            { XsdSimpleType.UnsignedShort, NumericDataTypes.UnsignedShort },
            { XsdSimpleType.UnsignedByte, NumericDataTypes.UnsignedByte },

            // Miscellaneous Types
            { XsdSimpleType.AnyURI, MiscellaneousDataTypes.AnyURI },
            { XsdSimpleType.Base64Binary, MiscellaneousDataTypes.Base64Binary },
            { XsdSimpleType.Boolean, MiscellaneousDataTypes.Boolean },
            { XsdSimpleType.Double, MiscellaneousDataTypes.Double },
            { XsdSimpleType.Float, MiscellaneousDataTypes.Float },
            { XsdSimpleType.HexBinary, MiscellaneousDataTypes.HexBinary },
            { XsdSimpleType.Notation, MiscellaneousDataTypes.Notation }
        };

        #endregion

        #region Simple Type CLR Lookup

        /// <remarks>http://msdn.microsoft.com/en-us/library/xa669bew%28v=vs.110%29.aspx</remarks>
        internal static readonly Dictionary<Type, XName> ClrTypeLookup = new Dictionary<Type, XName>()
        {
            { typeof(Uri), MiscellaneousDataTypes.AnyURI },
            { typeof(bool), MiscellaneousDataTypes.Boolean },
            { typeof(DateTime), DateAndTimeDataTypes.DateTime },
            { typeof(TimeSpan), DateAndTimeDataTypes.Duration },
            { typeof(string[]), StringDataTypes.Entities }, // This or xs:NMTOKENS
            { typeof(string), StringDataTypes.String },
            { typeof(XmlQualifiedName), MiscellaneousDataTypes.QName },

            // Numeric
            { typeof(Int16), NumericDataTypes.Short },
            { typeof(Int32), NumericDataTypes.Int },
            { typeof(Int64), NumericDataTypes.Long },
            { typeof(UInt16), NumericDataTypes.UnsignedShort },
            { typeof(UInt32), NumericDataTypes.UnsignedInt },
            { typeof(UInt64), NumericDataTypes.UnsignedLong },
            { typeof(SByte), NumericDataTypes.Byte },
            { typeof(byte) , NumericDataTypes.UnsignedByte },
            { typeof(float), MiscellaneousDataTypes.Float },
            { typeof(double), MiscellaneousDataTypes.Double },
            { typeof(decimal), NumericDataTypes.Decimal },
            { typeof(byte[]), MiscellaneousDataTypes.HexBinary }
        };

        #endregion

        /// <summary>
        /// Element names from the w3c schema standard
        /// </summary>
        /// <remarks>http://www.w3schools.com/schema/schema_elements_ref.asp</remarks>
        public static class Elements
        {
            #region XSD Elements

            /// <summary>
            /// Specifies that the child elements can appear in any order. Each child element can occur 0 or 1 time
            /// </summary>
            public static XName All { get { return XsdSchemaNamespace + "all"; } }

            /// <summary>
            /// Specifies the top-level element for schema comments
            /// </summary>
            public static XName Annotation { get { return XsdSchemaNamespace + "annotation"; } }

            /// <summary>
            /// Enables the author to extend the XML document with elements not specified by the schema
            /// </summary>
            public static XName Any { get { return XsdSchemaNamespace + "any"; } }

            /// <summary>
            /// Enables the author to extend the XML document with attributes not specified by the schema
            /// </summary>
            public static XName AnyAttribute { get { return XsdSchemaNamespace + "anyAttribute"; } }

            /// <summary>
            /// Specifies information to be used by the application (must go inside annotation)
            /// </summary>
            public static XName Appinfo { get { return XsdSchemaNamespace + "appinfo"; } }

            /// <summary>
            /// Defines an attribute
            /// </summary>
            public static XName Attribute { get { return XsdSchemaNamespace + "attribute"; } }

            /// <summary>
            /// Defines an attribute group to be used in complex type definitions
            /// </summary>
            public static XName AttributeGroup { get { return XsdSchemaNamespace + "attributeGroup"; } }

            /// <summary>
            /// Allows only one of the elements contained in the <choice> declaration to be present within the containing element
            /// </summary>
            public static XName Choice { get { return XsdSchemaNamespace + "choice"; } }

            /// <summary>
            /// Defines extensions or restrictions on a complex type that contains mixed content or elements only
            /// </summary>
            public static XName ComplexContent { get { return XsdSchemaNamespace + "complexContent"; } }

            /// <summary>
            /// Defines a complex type element
            /// </summary>
            public static XName ComplexType { get { return XsdSchemaNamespace + "complexType"; } }

            /// <summary>
            /// Defines text comments in a schema (must go inside annotation)
            /// </summary>
            public static XName Documentation { get { return XsdSchemaNamespace + "documentation"; } }

            /// <summary>
            /// Defines an element
            /// </summary>
            public static XName Element { get { return XsdSchemaNamespace + "element"; } }

            /// <summary>
            /// Extends an existing simpleType or complexType element
            /// </summary>
            public static XName Extension { get { return XsdSchemaNamespace + "extension"; } }

            /// <summary>
            /// Specifies an XPath expression that specifies the value used to define an identity constraint
            /// </summary>
            public static XName Field { get { return XsdSchemaNamespace + "field"; } }

            /// <summary>
            /// Defines a group of elements to be used in complex type definitions
            /// </summary>
            public static XName Group { get { return XsdSchemaNamespace + "group"; } }

            /// <summary>
            /// Adds multiple schemas with different target namespace to a document
            /// </summary>
            public static XName Import { get { return XsdSchemaNamespace + "import"; } }

            /// <summary>
            /// Adds multiple schemas with the same target namespace to a document
            /// </summary>
            public static XName Include { get { return XsdSchemaNamespace + "include"; } }

            /// <summary>
            /// Specifies an attribute or element value as a key (unique, non-nullable, and always present) within the containing element in an instance document
            /// </summary>
            public static XName Key { get { return XsdSchemaNamespace + "key"; } }

            /// <summary>
            /// Specifies that an attribute or element value correspond to those of the specified key or unique element
            /// </summary>
            public static XName Keyref { get { return XsdSchemaNamespace + "keyref"; } }

            /// <summary>
            /// Defines a simple type element as a list of values
            /// </summary>
            public static XName List { get { return XsdSchemaNamespace + "list"; } }

            /// <summary>
            /// Describes the format of non-XML data within an XML document
            /// </summary>
            public static XName Notation { get { return XsdSchemaNamespace + "notation"; } }

            /// <summary>
            /// Redefines simple and complex types, groups, and attribute groups from an external schema
            /// </summary>
            public static XName Redefine { get { return XsdSchemaNamespace + "redefine"; } }

            /// <summary>
            /// Defines restrictions on a simpleType, simpleContent, or a complexContent
            /// </summary>
            public static XName Restriction { get { return XsdSchemaNamespace + "restriction"; } }

            /// <summary>
            /// Defines the root element of a schema
            /// </summary>
            public static XName Schema { get { return XsdSchemaNamespace + "schema"; } }

            /// <summary>
            /// Specifies an XPath expression that selects a set of elements for an identity constraint
            /// </summary>
            public static XName Selector { get { return XsdSchemaNamespace + "selector"; } }

            /// <summary>
            /// Specifies that the child elements must appear in a sequence. Each child element can occur from 0 to any number of times
            /// </summary>
            public static XName Sequence { get { return XsdSchemaNamespace + "sequence"; } }

            /// <summary>
            /// Contains extensions or restrictions on a text-only complex type or on a simple type as content and contains no elements
            /// </summary>
            public static XName SimpleContent { get { return XsdSchemaNamespace + "simpleContent"; } }

            /// <summary>
            /// Defines a simple type and specifies the constraints and information about the values of attributes or text-only elements
            /// </summary>
            public static XName SimpleType { get { return XsdSchemaNamespace + "simpleType"; } }

            /// <summary>
            /// Defines a simple type as a collection (union) of values from specified simple data types
            /// </summary>
            public static XName Union { get { return XsdSchemaNamespace + "union"; } }

            /// <summary>
            /// Defines that an element or an attribute value must be unique within the scope
            /// </summary>
            public static XName Unique { get { return XsdSchemaNamespace + "unique"; } }

            #endregion

            #region XSD Restrictions/Facets for Datatypes

            /// <summary>
            /// Defines a list of acceptable values
            /// </summary>
            public static XName Enumeration { get { return XsdSchemaNamespace + "enumeration"; } }

            /// <summary>
            /// Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero
            /// </summary>
            public static XName FractionDigits { get { return XsdSchemaNamespace + "fractionDigits"; } }

            /// <summary>
            /// Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero
            /// </summary>
            public static XName Length { get { return XsdSchemaNamespace + "length"; } }

            /// <summary>
            /// Specifies the upper bounds for numeric values (the value must be less than this value)
            /// </summary>
            public static XName MaxExclusive { get { return XsdSchemaNamespace + "maxExclusive"; } }

            /// <summary>
            /// Specifies the upper bounds for numeric values (the value must be less than or equal to this value)
            /// </summary>
            public static XName MaxInclusive { get { return XsdSchemaNamespace + "maxInclusive"; } }

            /// <summary>
            /// Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero
            /// </summary>
            public static XName MaxLength { get { return XsdSchemaNamespace + "maxLength"; } }

            /// <summary>
            /// Specifies the lower bounds for numeric values (the value must be greater than this value)
            /// </summary>
            public static XName MinExclusive { get { return XsdSchemaNamespace + "minExclusive"; } }

            /// <summary>
            /// Specifies the lower bounds for numeric values (the value must be greater than or equal to this value)
            /// </summary>
            public static XName MinInclusive { get { return XsdSchemaNamespace + "minInclusive"; } }

            /// <summary>
            /// Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero
            /// </summary>
            public static XName MinLength { get { return XsdSchemaNamespace + "minLength"; } }

            /// <summary>
            /// Defines the exact sequence of characters that are acceptable 
            /// </summary>
            public static XName Pattern { get { return XsdSchemaNamespace + "pattern"; } }

            /// <summary>
            /// Specifies the maximum number of digits allowed. Must be greater than zero
            /// </summary>
            public static XName TotalDigits { get { return XsdSchemaNamespace + "totalDigits"; } }

            /// <summary>
            /// Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled
            /// </summary>
            public static XName WhiteSpace { get { return XsdSchemaNamespace + "whiteSpace"; } }

            #endregion
        }

        /// <summary>
        /// String data types from the w3c schema standard
        /// </summary>
        /// <remarks>http://www.w3schools.com/schema/schema_dtypes_string.asp</remarks>
        public static class StringDataTypes
        {
            public static XName Entities { get { return XsdSchemaNamespace + "ENTITIES"; } }
            
            public static XName Entity { get { return XsdSchemaNamespace + "ENTITY"; } }
            
            /// <summary>
            /// A string that represents the ID attribute in XML (only used with schema attributes)
            /// </summary>
            public static XName ID { get { return XsdSchemaNamespace + "ID"; } }
            
            /// <summary>
            /// A string that represents the IDREF attribute in XML (only used with schema attributes)
            /// </summary>
            public static XName IdRef { get { return XsdSchemaNamespace + "IDREF"; } }
            
            public static XName IdRefs { get { return XsdSchemaNamespace + "IDREFS"; } }
            
            /// <summary>
            /// A string that contains a valid language id
            /// </summary>
            public static XName Language { get { return XsdSchemaNamespace + "language"; } }

            /// <summary>
            /// A string that contains a valid XML name
            /// </summary>
            public static XName Name { get { return XsdSchemaNamespace + "Name"; } }

            public static XName NcName { get { return XsdSchemaNamespace + "NCName"; } }
            
            public static XName NmToken { get { return XsdSchemaNamespace + "NMTOKEN"; } }
            
            /// <summary>
            /// A string that represents the NMTOKEN attribute in XML (only used with schema attributes)
            /// </summary>
            public static XName NmTokens { get { return XsdSchemaNamespace + "NMTOKENS"; } }
            
            /// <summary>
            /// A string that does not contain line feeds, carriage returns, or tabs
            /// </summary>
            public static XName NormalizedString { get { return XsdSchemaNamespace + "normalizedString"; } }
            
            public static XName QName { get { return XsdSchemaNamespace + "QName"; } }
            
            /// <summary>
            /// A string
            /// </summary>
            public static XName String { get { return XsdSchemaNamespace + "string"; } }
            
            /// <summary>
            /// A string that does not contain line feeds, carriage returns, tabs, leading or trailing spaces, or multiple spaces
            /// </summary>
            public static XName Token { get { return XsdSchemaNamespace + "token"; } }
        }

        /// <summary>
        /// Date/time data types from the w3c schema standard
        /// </summary>
        /// <remarks>http://www.w3schools.com/schema/schema_dtypes_date.asp</remarks>
        public static class DateAndTimeDataTypes
        {
            /// <summary>
            /// Defines a date value
            /// </summary>
            public static XName Date { get { return XsdSchemaNamespace + "date"; } }
            
            /// <summary>
            /// Defines a date and time value
            /// </summary>
            public static XName DateTime { get { return XsdSchemaNamespace + "dateTime"; } }
            
            /// <summary>
            /// Defines a time interval
            /// </summary>
            public static XName Duration { get { return XsdSchemaNamespace + "duration"; } }
            
            /// <summary>
            /// Defines a part of a date - the day (DD)
            /// </summary>
            public static XName GDay { get { return XsdSchemaNamespace + "gDay"; } }
            
            /// <summary>
            /// Defines a part of a date - the month (MM)
            /// </summary>
            public static XName GMonth { get { return XsdSchemaNamespace + "gMonth"; } }
            
            /// <summary>
            /// Defines a part of a date - the month and day (MM-DD)
            /// </summary>
            public static XName GMonthDay { get { return XsdSchemaNamespace + "gMonthDay"; } }
            
            /// <summary>
            /// Defines a part of a date - the year (YYYY)
            /// </summary>
            public static XName GYear { get { return XsdSchemaNamespace + "gYear"; } }
            
            /// <summary>
            /// Defines a part of a date - the year and month (YYYY-MM)
            /// </summary>
            public static XName GYearMonth { get { return XsdSchemaNamespace + "gYearMonth"; } }
            
            /// <summary>
            /// Defines a time value
            /// </summary>
            public static XName Time { get { return XsdSchemaNamespace + "time"; } }
        }

        /// <summary>
        /// Numeric data types from the w3c schema standard
        /// </summary>
        /// <remarks>http://www.w3schools.com/schema/schema_dtypes_numeric.asp</remarks>
        public static class NumericDataTypes
        {
            /// <summary>
            /// A signed 8-bit integer
            /// </summary>
            public static XName Byte { get { return XsdSchemaNamespace + "byte"; } }
            
            /// <summary>
            /// A decimal value
            /// </summary>
            public static XName Decimal { get { return XsdSchemaNamespace + "decimal"; } }
            
            /// <summary>
            /// A signed 32-bit integer
            /// </summary>
            public static XName Int { get { return XsdSchemaNamespace + "int"; } }
            
            /// <summary>
            /// An integer value
            /// </summary>
            public static XName Integer { get { return XsdSchemaNamespace + "integer"; } }
            
            /// <summary>
            /// A signed 64-bit integer
            /// </summary>
            public static XName Long { get { return XsdSchemaNamespace + "long"; } }
            
            /// <summary>
            /// An integer containing only negative values (..,-2,-1)
            /// </summary>
            public static XName NegativeInteger { get { return XsdSchemaNamespace + "negativeInteger"; } }
            
            /// <summary>
            /// An integer containing only non-negative values (0,1,2,..)
            /// </summary>
            public static XName NonNegativeInteger { get { return XsdSchemaNamespace + "nonNegativeInteger"; } }
            
            /// <summary>
            /// An integer containing only non-positive values (..,-2,-1,0)
            /// </summary>
            public static XName NonPositiveInteger { get { return XsdSchemaNamespace + "nonPositiveInteger"; } }
            
            /// <summary>
            /// An integer containing only positive values (1,2,..)
            /// </summary>
            public static XName PositiveInteger { get { return XsdSchemaNamespace + "positiveInteger"; } }
            
            /// <summary>
            /// A signed 16-bit integer
            /// </summary>
            public static XName Short { get { return XsdSchemaNamespace + "short"; } }
            
            /// <summary>
            /// An unsigned 64-bit integer
            /// </summary>
            public static XName UnsignedLong { get { return XsdSchemaNamespace + "unsignedLong"; } }
            
            /// <summary>
            /// An unsigned 32-bit integer
            /// </summary>
            public static XName UnsignedInt { get { return XsdSchemaNamespace + "unsignedInt"; } }
            
            /// <summary>
            /// An unsigned 16-bit integer
            /// </summary>
            public static XName UnsignedShort { get { return XsdSchemaNamespace + "unsignedShort"; } }
            
            /// <summary>
            /// An unsigned 8-bit integer
            /// </summary>
            public static XName UnsignedByte { get { return XsdSchemaNamespace + "unsignedByte"; } }
        }
        
        /// <summary>
        /// Miscellaneous data types from the w3c schema standard
        /// </summary>
        /// <remarks>http://www.w3schools.com/schema/schema_dtypes_misc.asp</remarks>
        public static class MiscellaneousDataTypes
        {
            /// <summary>
            /// Note: If a URI has spaces, replace them with %20.
            /// </summary>
            public static XName AnyURI { get { return XsdSchemaNamespace + "anyURI"; } }

            public static XName Base64Binary { get { return XsdSchemaNamespace + "base64Binary"; } }

            /// <summary>
            /// Legal values for boolean are true, false, 1 (which indicates true), and 0 (which indicates false).
            /// </summary>
            public static XName Boolean { get { return XsdSchemaNamespace + "boolean"; } }
            public static XName Double { get { return XsdSchemaNamespace + "double"; } }
            public static XName Float { get { return XsdSchemaNamespace + "float"; } }
            public static XName HexBinary { get { return XsdSchemaNamespace + "hexBinary"; } }
            public static XName Notation { get { return XsdSchemaNamespace + "NOTATION"; } }
            public static XName QName { get { return XsdSchemaNamespace + "QName"; } }
        }

    }
}
